/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    DongPeng
 * 创建时间:    2023-10-04
 * copyright(c) 2022 无锡星智数服科技有限公司
 */
package org.jeecg.modules.dock.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.dock.aspect.DockLog;
import org.jeecg.modules.dock.constant.SystemConstants;
import org.jeecg.modules.dock.entity.mds.MdsBaseResponseVO;
import org.jeecg.modules.dock.entity.mds.request.MdsBaseRequestVO;
import org.jeecg.modules.dock.entity.mds.request.ReceivingColumnMaterialsRequestVO;
import org.jeecg.modules.dock.service.MdsDockingService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 提供MDS调用
 *
 * @author DongPeng
 * @version 1.0.0
 * @date 2023-10-04
 * @description 类描述
 */
@Slf4j
@RestController
@RequestMapping("/dock")
@RequiredArgsConstructor
@Api(tags = "提供MDS调用")
@DockLog(source = SystemConstants.MDS)
public class MdsDockingController {

    private final MdsDockingService mdsDockingService;

    @ApiOperation(value = "任务状态更新", notes = "任务状态更新")
    @PostMapping("/serviceInteraction")
    public MdsBaseResponseVO updateStatus(@RequestBody MdsBaseRequestVO vo) {
        mdsDockingService.updateStatus(vo);
        return MdsBaseResponseVO.ok();
    }

    @ApiOperation(value = "wms接收柱料明细", notes = "wms接收柱料明细")
    @PostMapping("/receiveDetails")
    public MdsBaseResponseVO receivingColumnMaterials(@RequestBody ReceivingColumnMaterialsRequestVO vo) {
        mdsDockingService.receivingColumnMaterials(vo);
        return MdsBaseResponseVO.ok();
    }

}
